package org.study.neo4j.boot.model;

import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.geo.Point;
import org.springframework.data.neo4j.core.schema.*;

/**
 * 演员实体类
 *
 * @author doveylovey
 * @version v1.0.0
 * @email 1135782208@qq.com
 * @date 2025年04月14日
 */
@Data
@NoArgsConstructor
@Node("Actor")
public class Actor {
    @Id
    private String name;

    @Property("bornYear")
    private Integer bornYear;

    /**
     * 位置坐标：x-纬度、y-经度
     */
    @Property("location")
    private Point location;

    public Actor(String name, Integer bornYear) {
        this.name = name;
        this.bornYear = bornYear;
    }

    public Actor(String name, Integer bornYear, Point location) {
        this.name = name;
        this.bornYear = bornYear;
        this.location = location;
    }
}
